﻿using Imaginecup.stage;
using Microsoft.Xna.Framework;
using imaginecup.objectManager;
using imaginecup.util;
using Imaginecup.util;
using Imaginecup.loop;
using Imaginecup.gameState.malaria.component.panel.clickAble;
using Imaginecup.observer;
using Imaginecup.factory;
using Imaginecup.util.particle;
using Imaginecup.componentSystem.component;
using Imaginecup.gameState.darkRain.manager;
using Imaginecup.sprite;
namespace Imaginecup.gameState.darkRain.stage
{
    public class Stage1 :  IStageLoop, IStage
    {

        private ISprite m_BackSprite;
        public Stage1()
        {

            //SceneMan scenMan = new SceneMan(this);
            //SceneMan sceneMan = new SceneMan(this);
            //sceneMan.SetDrawNumber(drawNumber);
            //sceneMan.SetTimeMan(timeMan);

            //m_SceneMan = sceneMan;

            ////오브젝트 매니저에서 사용할 데이터 초기화.
            //ObjectManagerData objManData = new ObjectManagerData(new MalariaCompInit());
            //SetFieldInfo(objManData);


            ////디폴트로 제일 처음 미니맵 화면을 선택한다.
            //ICmpScene minimap = m_SceneMan.GetScene(0);
            //minimap.SetSelectedScene();

            //GameResourceMan.GetResourceMan().SetMoney(100);

            NormalSprite sprite = new NormalSprite();
            sprite.SetTextureName("Back");
            m_BackSprite = sprite;
        }

        protected  void UnloadResource()
        {

            m_BackSprite.Release();
        //    base.UnloadResource();
        }

//#if WINDOWS
//        protected override void CheatKey()
//        {
//            ChangeStage(StageEnum.Stage2);
//        }
//#endif
//        public override void CheckGameState()
//        {
//            //if (LifeMan.GetLifeMan().GetLifeCount() == 0)
//            //{
//            //    SetGameOver();
//            //}


//            //else if (timeMan.GetTime() == 0)
//            //{
//            //    ChangeStage(StageEnum.Stage2);
//            //}

//        }





        public void Update(GameTime gameTime)
        {
        }

        public void Draw(GameTime gameTime, Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
        {
            m_BackSprite.Draw(spriteBatch, new EntityInfo(0, 0, 480, 800));
        }

        public void SetStageMan(IStageManController stageMan)
        {
        }

        public void Release()
        {
            UnloadResource();
        }
    }
}
